﻿@using Bids.Core.Common.Pager;
@model PagedList<Bids.Core.DomainObjects.User>
@{
    ViewBag.Title = "设计师";
}
<div class="khpj">
    <div class="khpj_top">
        <img src="images/sjs_tit.jpg" alt="img" width="458" height="58" />
        <div class="page" style="margin-top: 20px;">
            @Html.Pager(Model, new PagerOptions { 
                PageIndexParameterName = "page",CurrentPagerItemWrapperFormatString="<a href='javascript:;'>{0}</a>",
              ShowMorePagerItems=false,
               ShowFirstLast = false,
               NumericPagerItemCount = 3
                
               },"HomePage",null)
        </div>
    </div>
    <div class="design_txt">
        @{int sort = 1;}
        @foreach (var item in Model)
        {
            <dl>
                <dt>
                    <img src="@item.HeadPortrait" alt="img" width="154" height="149" /></dt>
                <dd>
                    <table width="760" border="0" cellpadding="0" align="right" cellspacing="0" style="border-collapse: collapse; font-size: 12px; line-height: 28px;">
                        <tr style="border-bottom: 1px dashed #333;">
                            <td height="28" colspan="2"><strong style="color: #005695;">@item.DisplayName</strong>&nbsp;&nbsp;<img src="images/sjs_icon.jpg" style="margin-top: 8px;" />
                                <label style="color: #005695;">中国&nbsp;&nbsp;设计师总排名：</label>@((Model.CurrentPageIndex - 1) * Model.PageSize + sort)</td>
                            <td width="85" height="28">
                                <label style="color: #005695;">参赛次数：</label>@item.Contributions.Count</td>
                            <td width="145" height="28">
                                <label style="color: #005695;">作品：</label>@item.Contributions.Sum(t=>t.ContributionItems.Count)</td>
                            <td width="131" height="28">
                                <label style="color: #005695;">总分：</label>@item.Scores.Sum(t=>t.ScoreValue) </td>
                        </tr>
                        <tr>
                            <td height="28" colspan="2">男 / @item.Province-@item.City / 平面设计师　</td>
                            <td colspan="3" rowspan="4" style="width: 360px; vertical-align: top">
                                @foreach (var con in item.Contributions.Take(7))
                                {
                                    <a href="#">
                                    <img src="@con.ContributionItems.OrderByDescending(t=>t.CreateTime).Select(t=>t.Logo).FirstOrDefault()" alt="img" width="64" height="48" /></a>
                                }
                                

                                

                            </td>
                        </tr>
                        <tr>
                            <td height="28" colspan="2">设计生活，城市压满梦想。</td>
                        </tr>
                        <tr>
                            <td height="28" colspan="2">
                                <label style="color: #005695;">胜利次数：</label>8</td>
                        </tr>
                        <tr>
                            <td width="97" height="28"></td>
                            <td width="302" height="28"></td>
                        </tr>
                    </table>
                </dd>
            </dl>
            sort++;
        }


        <div class="page">
            @Html.Pager(Model, new PagerOptions { 
                PageIndexParameterName = "page",CurrentPagerItemWrapperFormatString="<a href='javascript:;'>{0}</a>",
              ShowMorePagerItems=false,
               ShowFirstLast = false,
               NumericPagerItemCount = 3
                
               },"HomePage",null)
        </div>
    </div>
</div>
